#ifndef __X_CONTAINER_H
#define __X_CONTAINER_H

#include <stdbool.h>
#include <stdlib.h>
#include <string.h>

#define CONTAINER_EMPTY -1

// definitions of data struct
struct data_t
{
    struct data_t *next;
    int data;
};

struct queue_t
{
    struct data_t *head,
        *tail;
    size_t len;
};

struct stack_t
{
    struct data_t *head;
    size_t len;
};

// function declaration of operates on datastructs
struct data_t *new_data(int __data,
                        struct data_t *__next);

struct queue_t *init_queue();

void enqueue(struct queue_t *queue, int __data);

int dequeue(struct queue_t *queue);

struct stack_t *init_stack();

void push_stack(struct stack_t *stack, int __data);

int pop_stack(struct stack_t *stack);

#endif //__X_CONTAINER_H
